##-----------------------------------------------------------------------
## "UpdateNuGetPackages.ps1"
##-----------------------------------------------------------------------
# Find the packages.config and project configuration files location, and remove their read-only attribute flag.
#
Param(
  [string]$pathToSearch = $env:TF_BUILD_SOURCESDIRECTORY
)

Write-Host "Find the packages.config and project configuration files location, and remove their read-only attribute flag."

gci -Include packages.config, *.csproj -Recurse | % { if($_.IsReadOnly){$_.IsReadOnly= $false} }

Write-Host "Done!"
